package com.sjy.shopmall.controller;

import com.sjy.shopmall.service.GoodsService;
import com.sjy.shopmall.vo.ResultVO;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
@RequestMapping("goods")
public class GoodsController {
    @Resource
    GoodsService goodsService;
    @RequestMapping("goodsList")
    @ResponseBody
    ResultVO info() {
        return new ResultVO(ResultVO.success, null, goodsService.allGoods());
    }
}
